window.addEventListener('load',function() {
    /* 获取元素 */
    var bigBox = document.querySelector('.bigBox');
    var divSix = bigBox.querySelectorAll('div');//加入我们得6个组
    var rectangle = document.querySelectorAll('.rectangle');
    /* 鼠标移入函数 加阴影 */
    for(var i = 1;i < divSix.length;i ++) {
        (function(i){
            divSix[i].onmouseenter = function() {
                this.style.boxShadow = '2px 2px 30px #737373'
            }
            divSix[i].onmouseleave = function() {
                this.style.boxShadow = '';
            }
        }(i))
    }
    for(var i = 0;i < rectangle.length;i ++) {
        (function(i){
            rectangle[i].onmouseenter = function() {
                this.style.boxShadow = '5px 5px 40px #737373'
            }
            rectangle[i].onmouseleave = function() {
                this.style.boxShadow = '';
            }
        }(i))
    }
    /* 视频添加遮罩层 */
    var videoBox = document.querySelector('.video');
    var video = document.querySelector('video');
    videoBox.onclick = function() {
        videoBox.className = '';
        video.play();
    }
    

})